package cn.sytton.taffe.web.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 部门成员entity sys_dept_user
 *
 * @author skyrock
 */
@Schema(description = "部门成员")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_dept_user")
public class DeptUserEntity extends UserEntity {

    @Schema(description = "部门ID")
    @NotNull(message = "部门ID不能为空")
    private String deptId;    // 部门ID

    @Schema(description = "顺序")
    private int seq = 0; //顺序

    //-----以下是关联属性-----

    @Schema(description = "用户ID数组", accessMode = Schema.AccessMode.READ_ONLY)
    @TableField(exist = false)
    private List<String> userIds; //用户ID数组
}
